package org.ehe.finance.payable.event;

import lombok.Getter;
import org.springframework.context.ApplicationEvent;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 应付账款创建事件
 * @author :zhangnn
 * @className :PayableCreatedEvent
 * @description: TODO
 * @date 2025-09-02 10:49:00
 */
@Getter
public class PayableCreatedEvent extends ApplicationEvent {
    private final Long payableId;
    private final String billNo;
    private final Long supplierId;
    private final BigDecimal amount;
    private final LocalDateTime eventTime;

    public PayableCreatedEvent(Object source, Long payableId, String billNo,
                               Long supplierId, BigDecimal amount) {
        super(source);
        this.payableId = payableId;
        this.billNo = billNo;
        this.supplierId = supplierId;
        this.amount = amount;
        this.eventTime = LocalDateTime.now();
    }

}
